﻿using System;
using System.IO;

namespace DepSoft.Helpers.iTunes.Elements
{
    public class iTunesTrack
    {
        #region Public properties
        public int Id { get; set; }
        public string Album { get; set; }
        public string Artist { get; set; }
        public string AlbumArtist { get; set; }
        public int BitRate { get; set; }
        public string Comments { get; set; }
        public string Composer { get; set; }
        public string Genre { get; set; }
        public string Kind { get; set; }
        public string Location { get; set; }
        public string FileName
        {
            get
            {
                int index = this.Location.LastIndexOf(Path.DirectorySeparatorChar);
                if (index == -1)
                    return this.Location;
                else
                    return this.Location.Substring(index + 1);
            }
        }
        public string Name { get; set; }
        public int PlayCount { get; set; }
        public int SampleRate { get; set; }
        public Int64 Size { get; set; }
        public Int64 TotalTime { get; set; }
        public int TrackNumber { get; set; }
        #endregion
    }
}
